.form {
  padding: 0;
}

.form-title {
  font-size: @baseFontSize * 1.5;
  line-height: @baseLineHeight * 2;
  margin-bottom: @baseLineHeight;
}

// form item
.form-item {
  padding-bottom: @formItemSpaceHeight;

  .form-label {
    float: left;
    width: @formLabelWidth;
    text-align: right;
    padding-top: (30px - @baseLineHeight) / 2;
    line-height: @baseLineHeight;
  }

  .form-controls {
    margin-left: @formLabelWidth;
    padding-left: 10px;

    .input,
    .sel {
      vertical-align: top;
    }

    .swt {
      margin-top: 2px;
    }

    .chk {
      margin-top: (30px - @baseLineHeight) / 2;
      margin-bottom: (30px - @baseLineHeight) / 2;
    }

    .chk-list {
      padding-top: (30px - @baseLineHeight) / 2;

      .chk {
        margin-top: 0;
      }
    }

    .form-item-text {
        padding: 6px 0;
        line-height: @baseLineHeight;
        min-height: @baseLineHeight;
    }
  }

  .form-controls-connector {
    display: inline-block;
    width: 20px;
    line-height: 30px;
    text-align: center;
  }

  .form-control-item {
    .clearfix();
    clear: both;
    padding-bottom: @formItemSpaceHeight;
  }

  .form-help {
    line-height: 30px;
    vertical-align: top;
    color: @inactiveTextColor;
  }
}

.form-narrow-label .form-item {
  .form-label {
    width: @formNarrowLabelWidth;
  }

  .form-controls {
    margin-left: @formNarrowLabelWidth;
  }
}

// stacked form item
.form-stacked-label .form-item,
.form-item-stacked {
  .form-label {
    float: none;
    width: auto;
    display: block;
    padding-top: 0;
    margin-top: @baseSpace * 2;
    margin-bottom: @baseSpace;
    height: @baseLineHeight;
    overflow: visible;
    text-align: left;
  }

  .form-controls {
    margin-left: 0;
    padding-left: 0;
  }
}

// inline form item
.form-item-inline {
  display: inline-block;
  margin-left: 10px;
  vertical-align: top;
}

.form-item-first {
  margin-left: 0;
}

.form {
  // compact inline form item
  .form-item-compact {
    .form-label {
      width: auto;
    }

    .form-controls {
      display: inline-block;
      margin-left: 0;
    }
  }

  .form-item-nolabel {
    .form-label {
      display: none;
    }
  }
}

// styles of form actions
.form-actions {
  .clearfix();
  padding-top: @formItemSpaceHeight;
  padding-left: @formLabelWidth + 10px;
}

.form-narrow-label .form-actions {
  padding-left: @formNarrowLabelWidth + 10px;
}

.form-stacked-label .form-actions {
  padding-left: 0;
}

.form-actions-left {
  padding-left: 0;
}

.form-actions-right {
  padding-left: 0;
  text-align: right;
}

.form-actions-center {
  padding-left: 0;
  text-align: center;
}

.form-actions,
.form-actions-left,
.form-actions-center {
  .btn {
    margin-right: @baseSpace;
  }
}

.form-actions-right {
  .btn {
    margin-right: 0;
    margin-left: @baseSpace;
  }
}

// form divider
.form-divider {
  border: none;
  border-top: 1px solid @hrBorder;

  margin: @formItemSpaceHeight 0 @formItemSpaceHeight*2;
}

